package com.xsd.parser.module;

import cn.afterturn.easypoi.excel.annotation.Excel;

import java.io.Serializable;

/**
 * <p>
 * Schema组件属性
 * </p>
 *
 * @author kehaofei
 * @since 2019-12-09
 */
public class SchemaModel implements Serializable{

    private static final long serialVersionUID = 1L;

    /**
     * 属性名称
     */
    @Excel(name = "属性名称", orderNum = "1",isImportField = "true")
    private String schemaName;
    /**
     * 属性值
     */
    @Excel(name = "属性值", orderNum = "2",isImportField = "true")
    private String schemaValue;

    public String getSchemaName() {
        if(schemaName==null || schemaName.isEmpty()){
            return "";
        }
        return schemaName;
    }

    public void setSchemaName(String schemaName) {
        this.schemaName = schemaName;
    }

    public String getSchemaValue() {
        if(schemaValue==null || schemaValue.isEmpty()){
            return "";
        }
        return schemaValue;
    }

    public void setSchemaValue(String schemaValue) {
        if(schemaValue.equals("null")){
            this.schemaValue = "";
        }else {
            this.schemaValue = schemaValue;
        }
    }

    @Override
    public String toString() {
        return "SchemaModel{" +
                "schemaName='" + getSchemaName() + '\'' +
                ", schemaValue='" + getSchemaValue() + '\'' +
                '}';
    }
}
